package gov.police.diary.service.impl;

import gov.police.diary.dao.UnitDao;
import gov.police.diary.model.PolUnit;
import gov.police.diary.service.UnitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 * @author nmduc
 */
@Service("UnitService")
public class UnitServiceImpl implements UnitService {

    @Autowired
    private UnitDao unitDao;

    public PolUnit getUnit(long id) {
        return this.unitDao.getUnit(id);
    }

    public void saveUnit(PolUnit unit) {
        this.unitDao.saveUnit(unit);
    }

    public void deleteUnit(PolUnit unit) {
        this.unitDao.deleteUnit(unit);
    }

    public void updateUnit(PolUnit unit) {
        this.unitDao.updateUnit(unit);
    }

    public UnitDao getUnitDao() {
        return unitDao;
    }

    public void setUnitDao(UnitDao unitDao) {
        this.unitDao = unitDao;
    }
}
